export const createColumns = (vm) => [
  {
    title: '',
    width: 34,
    align: 'center',
    type: 'selection',
  },
  {
    title: '序号',
    key: 'id',
    align: 'center',
    width: 80,
    render(h, params) {
      return <div>{(vm.formData.pageNo - 1) * vm.formData.pageSize + params.index + 1}</div>
    },
  },
  { title: '反馈单位', key: '', align: 'center' },
  { title: '作品数量', key: '', align: 'center', sortable: 'custom', sortType: 'desc' },
  { title: '阅读量', key: '', align: 'center', sortable: 'custom' },
  { title: '播放量', key: '', align: 'center', sortable: 'custom' },
  { title: '点赞量', key: '', align: 'center', sortable: 'custom' },
  { title: '评论量', key: '', align: 'center', sortable: 'custom' },
  { title: '转发量', key: '', align: 'center', sortable: 'custom' },
  {
    title: '操作',
    align: 'center',
    render(h, params) {
      return (
        <div>
          <icon-button
            icon="edit_active"
            title="编辑"
            activated={false}
            nativeOnClick={() => {
              vm.handleEditTableRow(params.row)
            }}
          ></icon-button>
          <icon-button
            icon="delete_active"
            title="删除"
            class="ml14"
            width="26"
            height="26"
            style="vertical-align: sub"
            activated={false}
            nativeOnClick={() => {
              vm.handleDeleteTableRow(params.row)
            }}
          ></icon-button>
        </div>
      )
    },
  },
]
